package com.david.interview.step1;

/**
 * 懒汉式--适合单线程 多线程存在线程安全网问题导致不是单例
 * @author David
 * @version V1.0
 * @Package com.david.interview.step1
 * @date 2021/6/29 23:37
 */
public class P02Singleton4 {
    public static P02Singleton4 INSTANCE;
    private P02Singleton4(){}
    public static P02Singleton4 getInstance(){
        if (INSTANCE==null){
            INSTANCE=new P02Singleton4();
        }
        return INSTANCE;
    }
}
